#pragma once

#include "KeyInfo.h"
#include "SymmetricKeyInfo.h"

#include <string>
#include <vector>
#include <QMetaType>

namespace kryptos { namespace entities {

class Contact
{
public:
    Contact();
    Contact(const Contact& contact);
    Contact(const KeyInfo& keyinfo, SymmetricKeyInfoList symkeys=SymmetricKeyInfoList());
    virtual ~Contact();

    std::string              name() const;
    std::string              email() const;

    void                     addSymmetricKey(const SymmetricKeyInfo& symkeyinfo);

    KeyInfo                  keyInfo() const;
    SymmetricKeyInfoList     symmetricKeysInfo() const;

    bool                     hasSymmetricKey() const;


    bool operator==(const Contact &c) const;
    bool operator<(const Contact &c) const;

private:

    KeyInfo                  m_keyinfo;
    SymmetricKeyInfoList     m_symmetricKeys;
};

typedef std::vector<Contact> ContactList;

}}

Q_DECLARE_METATYPE(kryptos::entities::Contact)
Q_DECLARE_METATYPE(kryptos::entities::ContactList)
